package com.gzxxgl.user;

import java.util.HashMap;
import java.util.Map;

import com.gzxxgl.enu.EnumMsg;
import com.gzxxgl.model.data.SysLog;
import com.jfinal.core.Controller;
import com.jfinal.plugin.activerecord.Page;

public class SysLogController extends Controller {

	public void findlogs(){
		setAttr("dlsjjl", "查看所有日志 ");
		Map<String, Object> m = new HashMap<>();
		Map<String, String> con = new HashMap<>();
		m.put("code", 0);
		m.put("msg", EnumMsg.SUCCESS);
		
		Page<SysLog> page = null;
		try {
			con.put("xm", getPara("xm"));
			page = SysLog.dao.quwerylogs(getParaToInt("pageIndex"), getParaToInt("pageSize"), con);
		
		} catch (Exception e) {
			e.printStackTrace();
			m.put("code", 1);
			m.put("msg", EnumMsg.ERR);
		}
		m.put("count", page.getTotalRow());
		m.put("list", page);
		
		renderJson(m);
		
	}

	
}
